<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>相邻块元素垂直外边距的合并</title>
<style type="text/css">
.one{
	width:150px;
	height:150px;
	background:#FC0;	
	margin-bottom:20px;   /*定义第一个div的下外边距为20px*/
	}
.two{
	width:150px;
	height:150px;
	background:#63F;	
	margin-top:40px;      /*定义第二个div的上外边距为40px*/
	}
</style>
</head>
<body>
<div class="one">1</div>
<div class="two">2</div>
</body>
</html>